<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>红包详情</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/common.css" />
		<link rel="stylesheet" href="../css/iconfont.css" />
	</head>

	<body>

		<style>
			[v-cloak] {
				display: none;
			}
			
			html,
			body {
				height: 100%;
				background-color: white;
			}
			
			.mui-bar-nav {
				background: #f16456;
				height: 58px;
				-webkit-box-shadow: none;
				box-shadow: none;
			}
			
			.mui-bar .mui-title {
				margin-top: 18px;
			}
			
			.mui-bar-nav~.mui-content {
				padding-top: 58px;
			}
			
			.mui-action-back,
			.mui-title,
			.mui-action-back:active {
				color: #FFFFFF!important;
				margin-top: 17px;
			}
			
			.mui-content {
				height: 100%;
			}
			
			.mui-content>.mui-table-view:first-child {
				margin-top: 0px;
			}
			
			.mui-media-body .amount {
				float: right;
				padding: 8px 5px 0px 0px;
				color: red;
				font-size: 18px;
			}
			
			.title {
				margin-left: 15px;
				color: #6d6d72;
				font-size: 12px;
			}
			
			.packet {
				height: 210px;
			}
			
			.packet .packet-block {
				background-color: #f16456;
				height: 60px;
				border-radius: 0px 0px 80% 80%;
			}
			
			.packet .packet-content {
				text-align: center;
				margin-top: -30px;
			}
			
			.packet .packet-content img {
				border: 1px solid #f5e44d;
				border-radius: 5px;
				width: 60px;
				height: 60px;
			}
			
			.packet .packet-content b {
				color: #000000;
			}
		</style>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">红包详情</h1>
		</header>
		<div class="mui-content" id="bizVue" v-cloak>
			<div class="packet">
				<div class="packet-block"></div>
				<div class="packet-content">
					<img :src="sendPacket.headImg" />
					<p>{{sendPacket.nickname}}</p>
					<h1 style="color: #f16456;font-size: 45px;">{{sendPacket.amount}}<b style="font-size: 10px;">金币</b></h1>
					<p>共<b>{{sendPacket.packetQty}}</b>个红包,其中雷点为<b>{{sendPacket.landmine}}</b></p>
				</div>
			</div>
			<div class="title">
				领取{{sendPacket.grabQty}}/{{sendPacket.packetQty}}个红包。"保密"红包在抢包结束后公开。
			</div>
			<ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media" v-for="item in list">
					<img class="mui-media-object mui-pull-left" :src="item.headImg" width="60" height="60">
					<div class="mui-media-body">
						{{item.nickname}}
						<span class="mui-badge mui-badge-danger" v-if="item.isLandmine == 1">雷</span>
						<span class="amount">￥{{item.grabAmount == 0 ? '保密' : item.grabAmount}}</span>
						<h6>{{item.createTime.substr(5,11)}}</h6>
					</div>
				</li>
			</ul>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/vue.min.js"></script>
		<script type="text/javascript" src="../js/public.js"></script>
		<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
		<script>
			var vm = new Vue({
				el: '#bizVue',
				data: {
					sendPacket: {},
					list: []
				},
				mounted: function() {
					mui.plusReady(function() {
						swipeBack();
						vm.sendPacket = plus.webview.currentWebview().item;
						vm.loadData();
					});
				},
				methods: {
					loadData: function() {
						mui.postParam(PacketDetail, {
							id: vm.sendPacket.id
						}, function(result) {
							if(result.code == 0) {
								vm.list = result.list;
							} else {
								mymui(result.msg);
							}
						});
					},
				}
			});
		</script>

	</body>

</html>